package com.ostms.adv.utils;

import android.os.Environment;

import com.ostms.adv.BuildConfig;

public class CommonUtils {
    /**
     * net path
     */
    public static String BASE_URL = "";
    static {
        if ("release".equals(BuildConfig.BUILD_TYPE)) {
            BASE_URL = "http://129.204.64.118:88/ostms";//广告正式地址
        } else{
            BASE_URL = "http://111.231.239.124:80/ostms";//广告测试地址
        }
    }
    public static final String HEARTBEAT = BASE_URL + "/appUpdate/heartbeat";
    //获取更新APP
    public static final String LOGUPLOAD = BASE_URL + "/equipment/logUpload";
    //APP更新状态上传
    public static final String STATUSCHANGE = BASE_URL + "/appUpdate/statusChange";
    //注册接口
    public static final String REGISTER = BASE_URL + "/equipment/register";
    //APP下载
    public static final String DOWNLOAD = BASE_URL + "/file/download";
    //默认广告接口
    public static final String DEFAULT_ADV = BASE_URL + "/equipment/getDefaultAdv";
    //播放百度待机
    public static final String BAIDUSTANDBY = BASE_URL + "/advInfo/baiduStandby";
    //上传播放记录
    public static final String RECORD = BASE_URL + "/advPlay/record";
    //检查APP和服务器是否连接通畅
    public static final String APPCOLLECT = BASE_URL + "/equipment/appCollect";
    /**
     * file path
     */
    public static String BASE_FILEPAHT = Environment.getExternalStorageDirectory().getPath() + "/aosen";
    //保存本地日志文件的目录
    public static String LOG_PATH = "/log/adv";
    public static String SN_FILE_PATH = "/ostms_sn.txt";
    //广告文件夹地址
    public static String ADV_PATH = "/aosen/adv";
    /**
     * 变量
     */
    public static final String STATUSCODE = "statusCode";
    public static final String PLAN_ID = "planId";
    public static final String STATUSCODEFAILUR = "4";
    public static final String UPLOAD_LOG_TRUE = "1";
    //失效
    public static final String EQUIPMENT_STATUS_INVALID = "0";
    //未注册
    public static final String EQUIPMENT_STATUS_NO_REGISTER = "1";
    //未认证
    public static final String EQUIPMENT_STATUS_NO_CHECK = "6";

    /**
     * 设备密钥
     */
    public static final String EQUIPMENT_KEY = "setting.equipmentKey";

    /**
     * 为自更新保留计划id
     */
    public static final String PLAN_ID_SETTING = "setting.planId";
    /**
     * 设备编号，也就是SN号
     */
    public static final String EQUIPMENT_CODE = "equipmentCode";
    /**
     * mac
     */
    public static final String MAC = "mac";

    /**
     * 物联网卡号
     */
    public static final String NET_CODE = "netCode";
    /**
     * 奥森广告列表
     */
    public static final String ADV_LIST = "adv.list";
    /**
     * 默认广告列表
     */
    public static final String ADV_DEFAULTADV = "adv.defaultadv";
    /**
     * 待机广告列表
     */
    public static final String ADV_STANDBY = "adv.standby";
}
